package cloud.simple.service.domain;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cloud.simple.service.dao.UserDao;
import cloud.simple.service.model.User;

@Service
@Transactional
public class UserService {

	@Autowired
	private UserDao userDao;

	public List<User> searchAll() {
		List<User> list = userDao.findAll();
		return list;
	}

	public User findById(Long id) {
		return userDao.findOne(id);
	}
}
